WIP: Add boundary comm inner loop specializations for performance and allow setting vector length #1175
+169
−63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
This PR adds various inner loop specializations to avoid calling reductions, coordinate transformations, and masks in the inner boundary buffer setting loops where possible. I found this made a little bit of a difference for the multigrid communication, not sure that it really matters elsewhere.
It also exposes a flag
parthenon/mesh/comm_vector_length
which sets the vector length of the outer team policy. We have always used the Kokkos default value here (which is one). I am not sure if changing this value has any impact, but I at least wanted to be able to play around with it.As an aside, once #1142 is in, we may want to switch these loops to
par_for
s instead of raw Kokkos loops.PR Checklist